<template>
  <!-- 司机管理 -->
  <div class="public" @mouseenter="driverManage = true" @mouseleave="driverManage = false">
    <span>司机管理</span>
    <div class="work_area_list" v-if="driverManage">
      <span>司机基本信息</span>
      <span>驾驶记录</span>
      <span>违章记录</span>
      <span>违规记录</span>
    </div>
  </div>
</template>

<script>
import eventBus from '@/eventBus.js'
export default {
  data () {
    return {
      driverManage: false,
      carInformation: {
        show: false
      }
    }
  },
  created () {
    eventBus.$on('closeCover', val => (this.organization.show = val))
  }
}
</script>

<style scoped lang='less'>
.public {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
  cursor: default;
  text-align: center;
  border-right:2px solid #3BAEFA;
  & > span:hover {
    color: #3BAEFA;
  }
  .work_area_list {
    width: 220px;
    // height: 78px;
    border: 1px solid #ccc;
    background-color: #f3f3f3;
    position: absolute;
    top: 15px;
    z-index: 999999;
    span:last-child{
      border-bottom: 0;
    }
    span {
      display: block;
      padding: 0 10px 0 10px;
      line-height: 26px;
      color: #333;
      border-bottom: 1px solid #2ea9fa;
      &:hover {
        color: #fff;
        background-color: #2ea9fa;
      }
    }
  }
}
</style>